package com.njlime.cms.repository.app;

import com.njlime.cms.entities.Information;
import com.njlime.core.helper.PageBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Map;

/**
 * Created by Dean on 2017-10-10.
 */
public interface AppInformationDao extends JpaRepository<Information, Integer>,JpaSpecificationExecutor<Information> {
    Map<String, Object> get(int id, Integer unit_id);
    PageBean list(PageBean pageBean, Information information, int root_unit_id);
    int updateReading(int id, Integer unit_id);
    List<Map<String, Object>> bannerList(Information information, int root_unit_id);
    List<Map<String, Object>> topList(Information information, int root_unit_id);
    PageBean infoList(PageBean pageBean, Information information, Integer user_id, int root_unit_id);
    PageBean topicList(PageBean pageBean, Information information, int root_unit_id);
    int updateCommentNum(Integer id, int num);
    int updateMotion(Integer id, String motion);
    PageBean singleList(PageBean pageBean, int user_id, int root_unit_id);
    PageBean collectList(PageBean pageBean, int user_id, int root_unit_id);
    PageBean historyList(PageBean pageBean, int user_id, int root_unit_id);
}
